package cn.sw.system.onemany.agg.vo;

import cn.sw.system.onemany.agg.zhujie.OneMany;
import cn.sw.system.onemany.agg.zhujie.Relation;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
* Articles 表单
* @author 张众森 (个人博客:https://)
* @date 2025-07-07
* @tags 做一个优秀的全栈架构
*/

@Data
@NoArgsConstructor
@Relation(TableName = "sys_articles")
public class aVo {

    @Relation(FieldName = "id", PrimaryKey = "id")
    private String id;

    @Relation(FieldName = "title")
    private String title;

    @Relation(FieldName = "content")
    private String content;

    @Relation(FieldName = "publish_date")
    private LocalDateTime publishDate;

    @OneMany(targetEntity = bVo.class, foreignKey = "sys_article_id", mappedBy = "id")
    private List<bVo> bs;
}
